package com.iplant.aps.service.mesenum;

public enum APSTaskStepCancelLogCancelType {
	Default(0, "-"),
	/**
	 * 段改项，此车无
	 */
	One(1, "段改项，此车无"),
	/**
	 * 撤销原设计变更，此车无
	 */
	Two(2, "原设计变更，此车无"),
	/**
	 * 已驳回
	 */
	Three(3, "本工序已完成改造，此车无需重复作业"),
	/**
	 * 已驳回
	 */
	Four(4, "技术变更，取消该工序"),
	/**
	 * 已驳回
	 */
	Five(5, "该工序委外，此工序不需要");

	private int value;
	private String lable;

	private APSTaskStepCancelLogCancelType(int value, String lable) {
		this.value = value;
		this.lable = lable;
	}

	/**
	 * 通过 value 的数值获取枚举实例
	 *
	 * @param val
	 * @return
	 */
	public static APSTaskStepCancelLogCancelType getEnumType(int val) {
		for (APSTaskStepCancelLogCancelType type : APSTaskStepCancelLogCancelType.values()) {
			if (type.getValue() == val) {
				return type;
			}
		}
		return Default;
	}

	public int getValue() {
		return value;
	}

	public String getLable() {
		return lable;
	}
}
